CXX = g++
VERSION = 0.7
CXXFLAGS = -Wall -g -O2
LDFLAGS = -lboost_date_time -litoken -linput -L../  -lX11 -lXt -lXaw -L/usr/X11R6/lib/
PREFIX = /usr/local
TARGET = en_crypt

all: en_crypt 

en_crypt: main.cpp 
	$(CXX) $(CXXFLAGS) -DPREFIX=\"$(PREFIX)\" clipboard.cpp x11_selection.cpp main.cpp -o $(TARGET)-$(VERSION) $(LDFLAGS)

clean:
	rm -f $(TARGET)-$(VERSION) *.o *~ core.*

distclean: clean
	rm -rf config.* autom4te.cache autoscan.log configure.scan

install:
	test -d $(PREFIX)/bin || mkdir -p $(PREFIX)/bin
	cp $(TARGET)-$(VERSION) $(PREFIX)/bin
  
uninstall:
	rm $(PREFIX)/bin/$(TARGET)-$(VERSION)

